﻿namespace YAPL.Language.Core.Types {
	public class YAPLString : YAPLObject {
		private readonly string _strValue;
		public YAPLString(string strValue) : base("YAPLString") {
			_strValue = strValue;
		}

		public string StrValue {
			get { return _strValue; }
		}
		public override string ToString() {
			return StrValue;
		}

		public override object Value {
			get {
				return _strValue;
			}
		}

		public override YAPLClass YAPLType {
			get {
				return GCL.Get(ClassNames.YAPLString);
			}
		}
		public override YAPLObject Add(YAPLObject other) {
			return new YAPLString(_strValue + other.ToYAPLString().StrValue);
		}
	}
}
